<?php

namespace app\index\controller;

use think\Controller;
use think\Db;

class Othvideo extends Controller
{
    public function index(){
        $videoList=Db::name('othvideo')->order('othvideo_creat_time desc')->select();
        $i=0;
        foreach ($videoList as $k=>$v){
            if($i<4){
                $headVideoList[]=$v;
            }else{
                $contVideoList[]=$v;
            }
            $i++;
        }
        $this->assign('headVideoList',$headVideoList);
        $this->assign('contVideoList',$contVideoList);
        return $this->fetch();
    }
    public function play(){
        $othVideoId=input('param.id');
        $othvideo=Db::name('othvideo')->find($othVideoId);
        $this->assign('othvideo',$othvideo);
        return $this->fetch();
    }
}
